package com.hibernate.db.model;

// Generated 21.01.2013 15:52:18 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Vocabulary generated by hbm2java
 */
@Entity
@Table(name = "vocabulary", catalog = "learning")
public class Vocabulary implements java.io.Serializable {

	private Integer id;
	private Chapter chapter;
	private Category category;
	private String picPath;
	private byte[] picFile;
	private Boolean selected;
	private Set<Subjectde> subjectdes = new HashSet<Subjectde>(0);
	private Set<Label> labels = new HashSet<Label>(0);
	private Set<Adjectivede> adjectivedes = new HashSet<Adjectivede>(0);
	private Set<Verbde> verbdes = new HashSet<Verbde>(0);

	public Vocabulary() {
	}

	public Vocabulary(Chapter chapter, Category category, String picPath,
			byte[] picFile, Boolean selected, Set<Subjectde> subjectdes,
			Set<Label> labels, Set<Adjectivede> adjectivedes,
			Set<Verbde> verbdes) {
		this.chapter = chapter;
		this.category = category;
		this.picPath = picPath;
		this.picFile = picFile;
		this.selected = selected;
		this.subjectdes = subjectdes;
		this.labels = labels;
		this.adjectivedes = adjectivedes;
		this.verbdes = verbdes;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "chapterId")
	public Chapter getChapter() {
		return this.chapter;
	}

	public void setChapter(Chapter chapter) {
		this.chapter = chapter;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "categoryId")
	public Category getCategory() {
		return this.category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	@Column(name = "picPath", length = 100)
	public String getPicPath() {
		return this.picPath;
	}

	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}

	@Column(name = "picFile")
	public byte[] getPicFile() {
		return this.picFile;
	}

	public void setPicFile(byte[] picFile) {
		this.picFile = picFile;
	}

	@Column(name = "selected")
	public Boolean getSelected() {
		return this.selected;
	}

	public void setSelected(Boolean selected) {
		this.selected = selected;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vocabulary")
	public Set<Subjectde> getSubjectdes() {
		return this.subjectdes;
	}

	public void setSubjectdes(Set<Subjectde> subjectdes) {
		this.subjectdes = subjectdes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vocabulary")
	public Set<Label> getLabels() {
		return this.labels;
	}

	public void setLabels(Set<Label> labels) {
		this.labels = labels;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vocabulary")
	public Set<Adjectivede> getAdjectivedes() {
		return this.adjectivedes;
	}

	public void setAdjectivedes(Set<Adjectivede> adjectivedes) {
		this.adjectivedes = adjectivedes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "vocabulary")
	public Set<Verbde> getVerbdes() {
		return this.verbdes;
	}

	public void setVerbdes(Set<Verbde> verbdes) {
		this.verbdes = verbdes;
	}

}
